/*
* Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved.
*/

#ifndef DVPP_MEM_ALLOCATER_COMM_H
#define DVPP_MEM_ALLOCATER_COMM_H

#include "dvpp_mem_allocater.h"
#include "mem_pool_comm.h"
#include "dvpp_cmdlist.h"

init get_init_func(enum mem_node_type node_type);
struct mem_pool_info* get_mem_pool(enum dvpp_sqe_type mod_type, enum mem_node_type node_type, uint32_t pool_id);
uint32_t get_node_num(enum dvpp_sqe_type mod_type);
struct mutex* get_mutex(enum dvpp_sqe_type mod_type);
void* alloc_node(enum dvpp_sqe_type mod_type, enum mem_node_type node_type, uint32_t pool_id, uint32_t size);
void free_node(enum dvpp_sqe_type mod_type, enum mem_node_type node_type, uint32_t pool_id, struct mem_node* node);
int32_t check_pool_id(uint32_t pool_id);
void dvpp_create_mem_pools_by_id(uint32_t pool_id);
void dvpp_destroy_mem_pools_by_id(uint32_t pool_id);
#endif // #ifndef DVPP_MEM_ALLOCATER_COMM_H